import { request } from '@/utils/request';

export default class Index {

    // 保养 列表
    static getList (query) {
        return request({
            url: '/adient-pms/pad/deviceInspectionRecord/page',
            method: 'get',
            params: query
        });
    }

    // 保养 列表查询
    static searchKey (query) {
        return request({
            url: '/adient-pms/pc/deviceInspectionRecord/page',
            method: 'get',
            params: query
        });
    }

    // 保养 列表 取消
    static getChangeApply (query) {
        return request({
            url: '/adient-pms/pad/deviceInspectionRecord/chanegApply',
            method: 'put',
            params: query
        });
    }

    // 保养详情
    static loadByNo (no) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/loadByNo/${no}`,
            method: 'get',
        });
    }

    // 保养详情 备件领用单
    static waitCheckListByUser (query) {
        return request({
            url: `/adient-pms/pc/toolIoRecord/waitCheckListByUser`,
            method: 'get',
            params: query
        });
    }

    // 保养开始
    static startMaintain (query) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/startMaintain`,
            method: 'put',
            params: query
        });
    }

    // 保养完成
    static finishMaintain (query) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/finishMaintain`,
            method: 'put',
            params: query
        });
    }
}